package com.zdy.im.user.vo.response;

import com.sixeco.framework.common.data.BaseBeanClone;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.List;

public class LoginImResponseVo extends BaseBeanClone implements Serializable {

	/**
	 * 用户Id
	 */
	private long userId;
	/**
	 * 用户组Id集合;
	 */
	private String userGroupList;
	/**
	 * 密码
	 */
	private String password;
	/**
	 * 登陆token
	 */
	private String token;

	/**
	 * 握手协议编码cmd
	 */
	private String cmd;

	public static LoginImResponseVo build(){
		return new LoginImResponseVo();
	}

	public LoginImResponseVo toUserId(long userId) {
		this.userId = userId;
		return this;
	}

	public LoginImResponseVo toUserGroupList(String userGroupList) {
		this.userGroupList = userGroupList;
		return this;
	}

	public LoginImResponseVo toPassword(String password) {
		this.password = password;
		return this;
	}

	public LoginImResponseVo toToken(String token) {
		this.token = token;
		return this;
	}


	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public String getUserGroupList() {
		return userGroupList;
	}

	public void setUserGroupList(String userGroupList) {
		this.userGroupList = userGroupList;
	}

	public void setUserGroupList(List<Long> userGroupList) {
		if(null != userGroupList){
			this.userGroupList = StringUtils.join(userGroupList, ",");
		}

	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getCmd() {
		return cmd;
	}
	public void setCmd(String cmd) {
		this.cmd = cmd;
	}

	public LoginImResponseVo toCmd(String cmd) {
		this.cmd = cmd;
		return this;
	}
}